package cn.xcyy.itcc.fegin;

import cn.xcyy.itcc.feginfallback.CourseFeignClientFallbackFactory;
import cn.xcyy.itcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "course", value = "service-course", fallbackFactory = CourseFeignClientFallbackFactory.class)
@RequestMapping("/course")
public interface CourseFeignClient {

    /*
     *  查询课程订单信息
     *  课程Id集合，以逗号分隔
     **/
    @RequestMapping(value = "/info/{courseIds}",method = RequestMethod.GET)
    JSONResult courseOrderInfo(@PathVariable("courseIds") String courseIds);

    /**
     * 获取对象
     */
    @RequestMapping(value = "/course/{id}",method = RequestMethod.GET)
    JSONResult get(@PathVariable("id")Long id);

}
